Skip to content

Add MCP platform tool definitions#7599

Merged
cstns merged 5 commits into
7429_mcp-endpoint-handlerfrom
7430_mcp-platform-tools
Jul 1, 2026
Merged

Add MCP platform tool definitions#7599
cstns merged 5 commits into
7429_mcp-endpoint-handlerfrom
7430_mcp-platform-tools

Conversation

@cstns

@cstns cstns commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the full set of platform tool definitions for the MCP server. 22 tools across 7 domain files, all prefixed with platform. and using the app.inject() pattern to call existing HTTP routes.

  • teams.js (2): list-teams, get-team
  • applications.js (3): list-applications, get-application, create-application
  • instances.js (6): list-instances, get-instance, get-instance-status, get-instance-logs, check-name-availability, create-instance
  • snapshots.js (2): list-snapshots, create-snapshot
  • devices.js (4): list-devices, get-device, list-device-snapshots, create-device-snapshot
  • catalog.js (3): list-instance-types, list-stacks, list-blueprints
  • navigation.js (2): open-editor, open-instance

All read tools have readOnlyHint: true annotations. Write tools (create-application, create-instance, create-snapshot, create-device-snapshot) have readOnlyHint: false. No destructive tools in this first pass, those will come later alongside human-in-the-loop confirmation.

Also fixes CORS for the hijacked POST response by setting headers manually on reply.raw before handing off to the MCP transport.
Builds on #7429. Intentionally excludes manage-instance, update-device, and all destructive/delete operations for now.

Related Issue(s)

closes #7430

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns self-assigned this Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.14953% with 94 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (7429_mcp-endpoint-handler@114f307). Learn more about missing BASE report.

Files with missing lines Patch % Lines
forge/ee/lib/mcp/tools/instances.js 6.45% 29 Missing ⚠️
forge/ee/lib/mcp/tools/devices.js 10.52% 17 Missing ⚠️
forge/ee/lib/mcp/tools/navigation.js 12.50% 14 Missing ⚠️
forge/ee/lib/mcp/tools/applications.js 14.28% 12 Missing ⚠️
forge/ee/lib/mcp/tools/snapshots.js 15.38% 11 Missing ⚠️
forge/ee/lib/mcp/tools/catalog.js 10.00% 9 Missing ⚠️
forge/ee/routes/mcp/server.js 50.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##             7429_mcp-endpoint-handler    #7599   +/-   ##
============================================================
  Coverage                             ?   76.05%           
============================================================
  Files                                ?      424           
  Lines                                ?    22343           
  Branches                             ?     5889           
============================================================
  Hits                                 ?    16994           
  Misses                               ?     5349           
  Partials                             ?        0           
Flag Coverage Δ
backend 76.05% <12.14%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cstns cstns changed the base branch from main to 7429_mcp-endpoint-handler June 24, 2026 10:10
# Conflicts:
#	forge/ee/lib/mcp/tools/applications.js
#	forge/ee/lib/mcp/tools/catalog.js
#	forge/ee/lib/mcp/tools/devices.js
#	forge/ee/lib/mcp/tools/instances.js
#	forge/ee/lib/mcp/tools/navigation.js
#	forge/ee/lib/mcp/tools/snapshots.js
Co-authored-by: Steve-Mcl <sdmclaughlin@gmail.com>
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
Co-authored-by: Andrea Palmieri <76187074+andypalmi@users.noreply.github.com>
Co-authored-by: andypalmi <andrea@flowfuse.com>
@cstns cstns merged commit 8591f54 into 7429_mcp-endpoint-handler Jul 1, 2026
16 checks passed
@cstns cstns deleted the 7430_mcp-platform-tools branch July 1, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Platform Tool Definitions

2 participants